<!--
 * @Author: zqx me_zqx@163.com
 * @Date: 2024-11-20 11:37:30
 * @LastEditors: zqx me_zqx@163.com
 * @LastEditTime: 2025-02-26 17:09:54
 * @FilePath: /XMate-h5/src/views/myXmate/components/teamCustomerFilter.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <customerFilter
    v-bind="$attrs"
    ref="customerFilterRef"
    @onConfirm="onConfirmFilter"
  >
  </customerFilter>
</template>

<script setup>
import { ref, defineExpose, defineEmits } from "vue";
import customerFilter from "./customerFilter.vue";

const emits = defineEmits(["onConfirm"]);
const selectTeams = ref([]);

const customerFilterRef = ref();
function show() {
  customerFilterRef.value.show();
}

function hide() {
  customerFilterRef.value.hide();
}

function onConfirmFilter(parameter) {
  parameter.dptIds = selectTeams.value.map(v => v.id);
  emits("onConfirm", parameter);
}

defineExpose({
  show,
  hide
});
</script>

<style lang="less" scoped>
.team-info-view {
  .team-info-row {
    display: flex;
    flex: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
  }

  .info-title {
    font-weight: 500;
    font-size: 12px;
    color: #262626;
    line-height: 20px;
  }

  .select-view {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-weight: 400;
    font-size: 12px;
    color: #8c8c8c;
    line-height: 20px;
  }

  .right-icon {
    margin-left: 8px;
  }
}
</style>
